package com.grupoconstruobras.sigo.persistence;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the rol_permiso database table.
 * 
 */
@Entity
@Table(name="rol_permiso")
@NamedQuery(name="RolPermiso.findAll", query="SELECT r FROM RolPermiso r")
public class RolPermiso implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private RolPermisoPK id;

	@Column(name="sec_rol_permiso", nullable=false)
	private Integer secRolPermiso;

	//bi-directional many-to-one association to Permiso
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="sec_permiso", nullable=false, insertable=false, updatable=false)
	private Permiso tblPermiso;

	//bi-directional many-to-one association to Rol
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="sec_rol", nullable=false, insertable=false, updatable=false)
	private Rol tblRol;

	public RolPermiso() {
	}

	public RolPermisoPK getId() {
		return this.id;
	}

	public void setId(RolPermisoPK id) {
		this.id = id;
	}

	public Integer getSecRolPermiso() {
		return this.secRolPermiso;
	}

	public void setSecRolPermiso(Integer secRolPermiso) {
		this.secRolPermiso = secRolPermiso;
	}

	public Permiso getTblPermiso() {
		return this.tblPermiso;
	}

	public void setTblPermiso(Permiso tblPermiso) {
		this.tblPermiso = tblPermiso;
	}

	public Rol getTblRol() {
		return this.tblRol;
	}

	public void setTblRol(Rol tblRol) {
		this.tblRol = tblRol;
	}

}